from datetime import datetime

from state import State


class State1(State):

    def on_enter(self):
        print(f'State1 on_enter, {datetime.now()}')

    def on_exit(self):
        print(f'State1 on_exit, {datetime.now()}')


class State2(State):

    def on_enter(self):
        self.machine.set_parameter('a', 1)
        print(f'State2 on_enter, {datetime.now()}')

    def on_exit(self):
        print(f'State2 on_exit, {datetime.now()}')
